package com.itheima02;

import java.util.concurrent.CountDownLatch;

public class Test01 extends Thread {

    public static void main(String[] args) {

        CountDownLatch count = new CountDownLatch(3);
        MotherDownLatchDemo motherDownLatchDemo = new MotherDownLatchDemo(count);
        motherDownLatchDemo.start();

        ChileThread1 chileThread1=new ChileThread1(count);
        chileThread1.setName("小明");
        ChileThread2 chileThread2=new ChileThread2(count);
        chileThread2.setName("小兰");
        ChileThread3 chileThread3=new ChileThread3(count);
        chileThread3.setName("小紫");

        chileThread1.start();
        chileThread2.start();
        chileThread3.start();
    }
}
